﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Mangosoft.DiceCopy.Presentation.MvcApp.Models {
    public class JobHunting {
        public List<JobPosting> GetJobPostingsByGenre(string genre) {
            var jobs = new List<JobPosting> {
                new JobPosting{ JobTitle="IT", CompanyName = "DELL", Location="Wuxi", DatePosted=DateTime.Now},
                new JobPosting{ JobTitle="Designer", CompanyName = "GOOGLE", Location="Shanghai", DatePosted=DateTime.Parse("2012-6-5")},
                new JobPosting{ JobTitle="Web Designer", CompanyName = "APPLE", Location="Perking", DatePosted=DateTime.Parse("2010-11-5")},
                new JobPosting{ JobTitle="PL-SQL ", CompanyName = "APPLE", Location="Perking", DatePosted=DateTime.Parse("2009-4-5")}, 
                new JobPosting{ JobTitle="DBA", CompanyName = "IBM", Location="Hangzhou", DatePosted=DateTime.Parse("2011-9-12")},
                new JobPosting{ JobTitle="Artist", CompanyName = "DELL", Location="Guangzhou", DatePosted=DateTime.Parse("2012-10-25")}
            };

            return jobs;
        }

        public JobPosting GetJobById(Guid id) {
            return new JobPosting { JobId = id, JobTitle = "Designer", CompanyName = "GOOGLE", Location = "Shanghai", DatePosted = DateTime.Parse("2012-6-5") };
        }

        public Company GetCompanySummary(Guid id) {
            var company = new Company();
            company.Id = id;
            company.CompanyName = "IBM";
            company.PostedJobs = new List<JobPosting> {
                new JobPosting{ JobTitle="IT", CompanyName = "IBM", Location="Wuxi", DatePosted=DateTime.Now},
                new JobPosting{ JobTitle="Designer", CompanyName = "IBM", Location="Shanghai", DatePosted=DateTime.Parse("2012-6-5")},
                new JobPosting{ JobTitle="Web Designer", CompanyName = "IBM", Location="Perking", DatePosted=DateTime.Parse("2010-11-5")},
                new JobPosting{ JobTitle="PL-SQL ", CompanyName = "IBM", Location="Perking", DatePosted=DateTime.Parse("2009-4-5")}
            };

            return company;
        }
    }
}